<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<script type="text/javascript">
</script>
<div>
	<form id="f_scoreRule" action="<c:url value='/admin/srule/save.do'/>" method="post">
		<input type="hidden" name="scoreRule.scoreRuleId" value="${scoreRule.scoreRuleId}">
		<table id="t_scoreRule_detail">
			<tr>
				<th width="75px">中文名称</th>
				<td><input type="text" name="scoreRule.chineseName" value="${scoreRule.chineseName }"/></td>
			</tr>
			<tr>
			<th width="75px">英文名称</th>
				<td>
					<input type="text" id="scoreRule_scoreKey" name="scoreRule.scoreKey" value="${scoreRule.scoreKey }"/>
					<script type="text/javascript">
						var scoreRuleId = "<c:out value='${scoreRule.scoreRuleId}' />";
						var scoreRuleIdValue = parseInt(scoreRuleId);
						if(!isNaN(scoreRuleIdValue)){
							$("#scoreRule_scoreKey").attr("readonly","readonly");
					  	}
					</script>
				</td>
			</tr>
			<tr>
			<th width="75px">分数</th>
				<td>
					<input type="text" name="scoreRule.score" value="${scoreRule.score}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">是否可用</th>
				<td>
					<input type="checkbox" id="f_scoreRule_enabled" name="scoreRule.enabled" value="1"/>
					<script type="text/javascript">
						var scoreRuleEnabled = "<c:out value='${scoreRule.enabled}' />";
						var scoreRuleEnabledValue = parseInt(scoreRuleEnabled);
						if(scoreRuleEnabledValue == 1){
							$("#f_scoreRule_enabled").attr("checked",true);
					  	}
					</script>
				</td>
			</tr>
			<tr>
			<th width="45px">描述</th>
				<td><input type="text" name="scoreRule.description" value="${scoreRule.description}"/></td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
